/**
 * Copyright (c) 2010-2011 Pierre Labatut
 *
 * This file is part of Space-Chronicles project.
 *
 * Space-Chronicles is free software: you can redistribute it and/or modify it
 * under the terms of its license which may be found in the accompanying
 * LICENSE file or <http://code.google.com/p/space-chronicles/>.
 */
package space.input;

import net.java.games.input.Component;

/**
 *
 * @author Pierre Labatut
 */
public class PlayComponent implements Component{


    private final PlayControler controller;
    private final String name;

    public PlayComponent(PlayControler controller, String name) {
        if (name == null) {
            throw new NullPointerException();
        }
        if (controller== null) {
            throw new NullPointerException();
        }
        this.controller = controller;
        this.name = name;
    }

 

    public Identifier getIdentifier() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public boolean isRelative() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public boolean isAnalog() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public float getDeadZone() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public float getPollData() {
        return controller.getCurrentFrame().getFrame(name).getFloat("PollData");
    }

    public String getName() {
       return name;
    }

}
